The investigation of transverse spin and transverse momentum effects in deep inelastic scattering is one of the key physics programs of the COMPASS collaboration. In the years 2002-2004 COMPASS took data scattering 160 GeV muons on a transversely polarized 6LiD target. In 2007, a transversely polarized NH3 target was used. Three different channels to access the transversity distribution function have been analyzed: The azimuthal distribution of single hadrons, involving the Collins fragmentation function, the azimuthal dependence of the plane containing hadron pairs, involving the two-hadron interference fragmentation function, and the measurement of the transverse polarization of lambda hyperons in the final state. Transverse quark momentum effects in a transversely polarized nucleon have been investigated by measuring the Sivers distribution function. Azimuthal asymmetries in unpolarized semi-inclusive deep-inelastic scattering give important information on the inner structure of the nucleon as well, and can be used to estimate both the quark transverse momentum in an unpolarized nucleon and to access the so-far unmeasured Boer-Mulders function. COMPASS has measured these asymmetries in 2004 using spin-averaged 6LiD data.